home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / board / Chaos53src.lha / chaos / src / NonAmiga.h < prev    next >
C/C++ Source or Header  |  1994-03-23  |  3KB  |  99 lines

  1. /*  Chaos:            The Chess HAppening Organisation System    V5.3
  2.     Copyright (C)   1993    Jochen Wiedmann
  3.  
  4.     This program is free software; you can redistribute it and/or modify
  5.     it under the terms of the GNU General Public License as published by
  6.     the Free Software Foundation; either version 2 of the License, or
  7.     (at your option) any later version.
  8.  
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.     GNU General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU General Public License
  15.     along with this program; if not, write to the Free Software
  16.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18.  
  19.     $RCSfile: NonAmiga.h $
  20.     $Revision: 1.1 $
  21.     $Date: 1994/01/26 22:47:54 $
  22.  
  23.     This is the include-file of NonAmiga.c, which holds the prototypes of
  24.     certain functions and defines the list structures.
  25.  
  26.     Computer:    Amiga 1200            Compiler:    Dice 2.07.54 (3.0)
  27.  
  28.     Author:    Jochen Wiedmann
  29.         Am Eisteich 9
  30.       72555 Metzingen
  31.         Tel. 07123 / 14881
  32.         Internet: wiedmann@mailserv.zdv.uni-tuebingen.de
  33. */
  34.  
  35.  
  36. #ifndef NONAMIGA_H
  37. #define NONAMIGA_H
  38.  
  39.  
  40. /*
  41.     This is an excerpt from the Amiga includes and defines the list
  42.     structures.
  43. */
  44.  
  45. /*
  46.  *  List Node Structure.  Each member in a list starts with a Node
  47.  */
  48.  
  49. struct Node {
  50.     struct  Node *ln_Succ;    /* Pointer to next (successor) */
  51.     struct  Node *ln_Pred;    /* Pointer to previous (predecessor) */
  52.     unsigned char ln_Type;
  53.     char    ln_Pri;        /* Priority, for sorting */
  54.     char    *ln_Name;        /* ID string, null terminated */
  55. };    /* Note: word aligned */
  56.  
  57. /* minimal node -- no type checking possible */
  58. struct MinNode {
  59.     struct MinNode *mln_Succ;
  60.     struct MinNode *mln_Pred;
  61. };
  62.  
  63. /*
  64.  *  Full featured list header.
  65.  */
  66. struct List {
  67.    struct  Node *lh_Head;
  68.    struct  Node *lh_Tail;
  69.    struct  Node *lh_TailPred;
  70.    unsigned char lh_Type;
  71.    char    l_pad;
  72. };    /* word aligned */
  73.  
  74. /*
  75.  * Minimal List Header - no type checking
  76.  */
  77. struct MinList {
  78.    struct  MinNode *mlh_Head;
  79.    struct  MinNode *mlh_Tail;
  80.    struct  MinNode *mlh_TailPred;
  81. };    /* longword aligned */
  82.  
  83.  
  84.  
  85.  
  86. /*
  87.     Function prototypes
  88. */
  89. int Stricmp(const char *, const char *);
  90. int Strnicmp(const char *, const char *, int);
  91. int StrToLong(char *, int *);
  92. void NewList(struct List *);
  93. void AddHead(struct List *, struct Node *);
  94. void AddTail(struct List *, struct Node *);
  95. void Insert(struct List *, struct Node *, struct Node *);
  96. void Remove(struct Node *);
  97.  
  98. #endif /* !NONAMIGA_H */
  99.